package lesson.thread.test6;

import java.util.TreeSet;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class Demo6 {
    public static void main(String[] args) {
        MyCallable mc = new MyCallable();

        FutureTask<String> ft = new FutureTask<>(mc);

        Thread t1 = new Thread(ft);
        t1.setName("飞机");
        t1.setPriority(10);
        t1.start();

        MyCallable mc2 = new MyCallable();

        FutureTask<String> ft2 = new FutureTask<>(mc2);

        Thread t2 = new Thread(ft2);
        t2.setName("Fiji");
        t2.setPriority(1);
        t2.start();
    }
}
